/**
 * 工程名称:oms
 * 文件名称:StockFmlaRatioStorageDAOImpl.java
 * 所属包:cn.rkylin.oms.system.stockpush.dao.impl
 * 创建时间:2017年9月4日上午11:41:33
 * Copyright (c) 2017 瑞金麟(大连)信息技术有限公司 All Rights Reserved.
 * 创建人:zhanghao
 */

package cn.rkylin.oms.system.stockpush.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.system.stockpush.dao.IStockFmlaRatioStorageDAO;
import cn.rkylin.oms.system.stockpush.domain.StockFmlaRatioStorage;
import cn.rkylin.oms.system.stockpush.vo.StockFmlaRatioStorageVO;

/**
 * 类名:StockFmlaRatioStorageDAOImpl <br/>
 * 作用: 仓库店铺推送比例的数据库交互类实现. <br/>
 * 创建原因:	 完成仓库店铺推送比例的mysql数据库交互. <br/>
 * 创建时间:     2017年9月4日 上午11:41:33 <br/>
 * @author   zhanghao
 * @version  v1.0
 * @since    JDK 1.6
 * @see 	 
 */
@Repository(value = "stockFmlaRatioStorageDAO")
public class StockFmlaRatioStorageDAOImpl implements IStockFmlaRatioStorageDAO {
    
    private static final String STMT_SELECT_BY_SELECTIVE_VALUE = "selectBySelectiveValueRatioStorage";
    private static final String STMT_UPDATE_BY_UNION_KEY = "updateRatioStorageByUnionKey";
    private static final String STMT_INSERT = "insertRatioStorage";
    
    @Autowired
    protected IDataBaseFactory dao;
    
    public StockFmlaRatioStorageDAOImpl() {
        
    }

    @Override
    public int deleteByPrimaryKey(String ratioId) {

        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public int insert(StockFmlaRatioStorage record) throws Exception {
        return dao.insert(STMT_INSERT, record);
    }

    @Override
    public int insertSelective(StockFmlaRatioStorage record) {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public StockFmlaRatioStorage selectByPrimaryKey(String ratioId) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(StockFmlaRatioStorage record) throws Exception {
        return dao.update(STMT_UPDATE_BY_UNION_KEY, record);
    }

    @Override
    public int updateByPrimaryKey(StockFmlaRatioStorage record) {

        // TODO Auto-generated method stub
        return 0;
    }

    /**
     * 方法复写
     * 查询仓库推送比例数据.
     * @see cn.rkylin.oms.system.stockpush.dao.IStockFmlaRatioStorageDAO#selectBySelectiveValue(cn.rkylin.oms.system.stockpush.vo.StockFmlaRatioStorageVO)
     */
    @Override
    public List<StockFmlaRatioStorage> selectBySelectiveValue(StockFmlaRatioStorageVO stockFmlaRatioStorageVO) throws Exception {
        return dao.find(STMT_SELECT_BY_SELECTIVE_VALUE, stockFmlaRatioStorageVO);
    }

}

